#ifndef OBOBJECT_H
#define OBOBJECT_H

#include "D3DUtil.h"
#include "Camera.h"
#include "d3dx9.h"
#include "dxaudio.h"

class ObObject{
public:
	ObObject();
	virtual ~ObObject() {}

	virtual bool	setId(int nid);
	int				getId();
	virtual bool	setInfo(int ninfo);
	int				getInfo();
	float			getWidth();
	float			getHeight();
	void			setHashId(int nid);
	int				getHashId();
	bool			getDisposeStatus();
	void			setPos(D3DXVECTOR3& pos);
	D3DXVECTOR3&	getPos();
	void			setCenter(D3DXVECTOR3& center);
	D3DXVECTOR3&	getCenter();
	std::string		getSaveString();

	virtual void collidedWith(ObObject* object, CollisionRS rs) {};
	virtual void update(float dt) = 0;
	virtual void render(ID3DXSprite* mSprite) = 0;
	static RECT calRenderRECT(D3DXVECTOR3 spritePos, float width, float height);
	//new
	bool mNeedCollision;
	bool mNeedDispose;
protected:
	int		mID;
	int		mInfo;
	float	mWidth;
	float	mHeight;
	int		mHashID;

	D3DXVECTOR3 mPos;
	D3DXVECTOR3 mCenter;
	D3DXVECTOR3 mSpritePos;
	float		mRotation;
};

#endif